<template>
  <van-sticky :offset-top="0">
    <van-nav-bar   style="" :border="false">
      <template #left>
        <div>
          <slot name="left"></slot>
        </div>
      </template>
      <template #title>
        <div class="text-size-18   ">
          <slot name="center"></slot>
        </div>
      </template>
      <template #right>
        <div class="">
          <slot name="right"></slot>
        </div>
      </template>
    </van-nav-bar>
  </van-sticky>
</template>

<script >
import { showToast } from 'vant';
export default {
  name: "sharedHeader",
  props:['title','backText',],
  setup() {
    const onClickLeft = () => history.back();
    const onClickRight = () => showToast('按钮');
    return {
      onClickLeft,
      onClickRight,
    };
  },
};
</script>


